﻿<Window x:Class="JDKD.BMCS.AppUI.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:w="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
        Title="MainWindow" MinWidth="1920" MinHeight="1080" Left="0" Top="0" FontFamily="FangSong_GB2312" FontSize="24" Foreground="AliceBlue" WindowStyle="None" ResizeMode="NoResize" Loaded="Window_Loaded" Closing="Window_Closing">
        <Grid Name="LayoutRoot">
                <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition></ColumnDefinition>
                </Grid.ColumnDefinitions>

                <Grid Margin="16" Name="grid3">
                        <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="692" />
                                <ColumnDefinition Width="692" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                                <RowDefinition Height="524" />
                                <RowDefinition Height="524" />
                        </Grid.RowDefinitions>

                        <Border BorderThickness="2" Margin="8" Focusable="True" Grid.Row ="0" Grid.Column="0">
                                <Border.BorderBrush>
                                        <RadialGradientBrush>
                                                <GradientStop Color="Black" Offset="0" />
                                                <GradientStop Color="White" Offset="1" />
                                        </RadialGradientBrush>
                                </Border.BorderBrush>
                                <WindowsFormsHost HorizontalAlignment="Left" Name="windowsFormsHost1" VerticalAlignment="Top">
                                        <w:PictureBox Width="672" Height="504" x:Name="FirstPictureBox" MouseClick="FirstPictureBox_MouseClick"></w:PictureBox>
                                </WindowsFormsHost>
                        </Border>
                        <Border BorderThickness="2" Margin="8" Grid.Row="0"  Grid.Column="1">
                                <Border.BorderBrush>
                                        <RadialGradientBrush>
                                                <GradientStop Color="Black" Offset="0" />
                                                <GradientStop Color="White" Offset="1" />
                                        </RadialGradientBrush>
                                </Border.BorderBrush>
                                <WindowsFormsHost HorizontalAlignment="Left" Name="windowsFormsHost2" VerticalAlignment="Top">
                                        <w:PictureBox Width="672" Height="504" x:Name="ThirdPictureBox" MouseClick="ThirdPictureBox_MouseClick"></w:PictureBox>
                                </WindowsFormsHost>
                        </Border>
                        <Border BorderThickness="2" Margin="8" Focusable="True" Grid.Row="1"  Grid.Column="0">
                                <Border.BorderBrush>
                                        <RadialGradientBrush>
                                                <GradientStop Color="Black" Offset="0" />
                                                <GradientStop Color="White" Offset="1" />
                                        </RadialGradientBrush>
                                </Border.BorderBrush>
                                <WindowsFormsHost HorizontalAlignment="Left" VerticalAlignment="Top">
                                        <w:PictureBox Width="672" Height="504" x:Name="SecondPictureBox" MouseClick="SecondPictureBox_MouseClick"></w:PictureBox>
                                </WindowsFormsHost>
                        </Border>
                        <Border BorderThickness="2" Margin="8" Focusable="True" Grid.Column="1" Grid.Row="1">
                                <Border.BorderBrush>
                                        <RadialGradientBrush>
                                                <GradientStop Color="Black" Offset="0" />
                                                <GradientStop Color="White" Offset="1" />
                                        </RadialGradientBrush>
                                </Border.BorderBrush>
                                <WindowsFormsHost HorizontalAlignment="Left" VerticalAlignment="Top">
                                        <w:PictureBox Width="672" Height="504" x:Name="FouthPictureBox" MouseClick="FouthPictureBox_MouseClick"></w:PictureBox>
                                </WindowsFormsHost>
                        </Border>
                </Grid>
                <Grid Margin="0,16,16,16" Name="grid1" Grid.Column="1">
                        <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <TextBlock HorizontalAlignment="Left" Name="textBlock1" Text="送坯控制系统" VerticalAlignment="Center" Margin="10" FontSize="40" Grid.Row="1" />
                        <TextBlock Grid.Row="2" HorizontalAlignment="Right" Name="textBlock2" Text="武汉九鼎" VerticalAlignment="Center" FontSize="36" Margin="10" />
                        <TextBlock Grid.Row="3" HorizontalAlignment="Left" Name="textBlock3" Text="系统时间" VerticalAlignment="Center" Margin="10" />
                        <TextBlock Grid.Row="3" HorizontalAlignment="Right" Name="textBlock4" Text="{Binding Now}" VerticalAlignment="Center" Margin="10" />

                        <Button Content="退出系统" HorizontalAlignment="Right" Margin="10" Name="ExitButton" VerticalAlignment="Center" Background="{x:Null}" Foreground="AliceBlue" Click="ExitButton_Click" />
                        <TextBlock Grid.Row="4" HorizontalAlignment="Left" Name="textBlock5" Text="用户状态" VerticalAlignment="Top" Margin="10" />
                        <TextBlock Grid.Row="4" HorizontalAlignment="Right" Name="LoginStateTextBlock" Text="{Binding LoginText}" VerticalAlignment="Center" Margin="10" MouseLeftButtonDown="LoginStateTextBlock_MouseLeftButtonDown" />
                        <Frame Grid.Row="9" HorizontalAlignment="Stretch" Name="MainFrame" VerticalAlignment="Stretch" Margin="0" Source="CameraPage.xaml" NavigationUIVisibility="Hidden" MinHeight="200" JournalOwnership="UsesParentJournal" />
                        <Button Grid.Row="7" HorizontalAlignment="Left" Margin="10" Name="PushButton" Content="推    钢" VerticalAlignment="Center" Background="{x:Null}" Foreground="AliceBlue" Click="PushButton_Click" />
                        <Button Grid.Row="6" HorizontalAlignment="Left" Margin="10" Name="ShiftButton"  Content="翻    钢" VerticalAlignment="Center" Background="{x:Null}" Foreground="AliceBlue" Click="ShiftButton_Click" />
                        <Button Grid.Row="5" HorizontalAlignment="Left" Margin="10" Name="RaiseButton" Content="挡    板" VerticalAlignment="Center" Background="{x:Null}" Foreground="AliceBlue" Click="RaiseButton_Click" />
                        <Grid Grid.Row="5" HorizontalAlignment="Right" Name="grid2" VerticalAlignment="Center" Margin="0,4,24,4">
                                <Grid.RowDefinitions>
                                        <RowDefinition />
                                        <RowDefinition />
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                        <ColumnDefinition />
                                        <ColumnDefinition />
                                        <ColumnDefinition />
                                        <ColumnDefinition />
                                </Grid.ColumnDefinitions>
                                <Image Height="48" HorizontalAlignment="Center" Name="Channel1RaiseImage" Stretch="UniformToFill" VerticalAlignment="Center" Width="48"  Source="{Binding Channels[1].RaiseImageSource}"  Grid.Column="0" Grid.Row="0" Margin="16,2" />
                                <Image Height="48" HorizontalAlignment="Center" Name="Channel2RaiseImage" Stretch="UniformToFill" VerticalAlignment="Center" Width="48"  Source="{Binding Channels[2].RaiseImageSource}"  Grid.Column="1" Grid.Row="0" Margin="16,2" />
                                <Image Height="48" HorizontalAlignment="Center" Name="Channel3RaiseImage" Stretch="UniformToFill" VerticalAlignment="Center" Width="48"  Source="{Binding Channels[3].RaiseImageSource}"  Grid.Column="2" Grid.Row="0" Margin="16,2" />
                                <Image Height="48" HorizontalAlignment="Center" Name="Channel4RaiseImage" Stretch="UniformToFill" VerticalAlignment="Center" Width="48"  Source="{Binding Channels[4].RaiseImageSource}"  Grid.Column="3" Grid.Row="0" Margin="16,2" />
                                <Image Height="48" HorizontalAlignment="Center" Name="Channel5RaiseImage" Stretch="UniformToFill" VerticalAlignment="Center" Width="48"  Source="{Binding Channels[5].RaiseImageSource}"  Grid.Column="0" Grid.Row="1" Margin="16,2" />
                                <Image Height="48" HorizontalAlignment="Center" Name="Channel6RaiseImage" Stretch="UniformToFill" VerticalAlignment="Center" Width="48"  Source="{Binding Channels[6].RaiseImageSource}"  Grid.Column="1" Grid.Row="1" Margin="16,2" />
                                <Image Height="48" HorizontalAlignment="Center" Name="Channel7RaiseImage" Stretch="UniformToFill" VerticalAlignment="Center" Width="48"  Source="{Binding Channels[7].RaiseImageSource}"  Grid.Column="2" Grid.Row="1" Margin="16,2" />
                                <Image Height="48" HorizontalAlignment="Center" Name="Channel8RaiseImage" Stretch="UniformToFill" VerticalAlignment="Center" Width="48"  Source="{Binding Channels[8].RaiseImageSource}"  Grid.Column="3" Grid.Row="1" Margin="16,2" />

                                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="1" FontSize="32" Grid.Column="0" Grid.Row="0" Margin="16,2" />
                                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="2" FontSize="32" Grid.Column="1" Grid.Row="0" Margin="16,2" />
                                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="3" FontSize="32" Grid.Column="2" Grid.Row="0" Margin="16,2" />
                                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="4" FontSize="32" Grid.Column="3" Grid.Row="0" Margin="16,2" />
                                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="5" FontSize="32" Grid.Column="0" Grid.Row="1" Margin="16,2" />
                                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="6" FontSize="32" Grid.Column="1" Grid.Row="1" Margin="16,2" />
                                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="7" FontSize="32" Grid.Column="2" Grid.Row="1" Margin="16,2" />
                                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="8" FontSize="32" Grid.Column="3" Grid.Row="1" Margin="16,2" />
                        </Grid>
                        <Grid Grid.Row="6" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,4,24,4">
                                <Grid.RowDefinitions>
                                        <RowDefinition />
                                        <RowDefinition />
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                        <ColumnDefinition />
                                        <ColumnDefinition />
                                        <ColumnDefinition />
                                        <ColumnDefinition />
                                </Grid.ColumnDefinitions>
                                <Image Height="48" HorizontalAlignment="Center" Name="Channel1ShiftImage" Stretch="UniformToFill" VerticalAlignment="Center" Width="48" Source="{Binding Channels[1].ShiftImageSource}" Grid.Column="0" Grid.Row="0" Margin="16,2" />
                                <Image Height="48" HorizontalAlignment="Center" Name="Channel2ShiftImage" Stretch="UniformToFill" VerticalAlignment="Center" Width="48" Source="{Binding Channels[2].ShiftImageSource}" Grid.Column="1" Grid.Row="0" Margin="16,2" />
                                <Image Height="48" HorizontalAlignment="Center" Name="Channel3ShiftImage" Stretch="UniformToFill" VerticalAlignment="Center" Width="48" Source="{Binding Channels[3].ShiftImageSource}" Grid.Column="2" Grid.Row="0" Margin="16,2" />
                                <Image Height="48" HorizontalAlignment="Center" Name="Channel4ShiftImage" Stretch="UniformToFill" VerticalAlignment="Center" Width="48" Source="{Binding Channels[4].ShiftImageSource}" Grid.Column="3" Grid.Row="0" Margin="16,2" />
                                <Image Height="48" HorizontalAlignment="Center" Name="Channel5ShiftImage" Stretch="UniformToFill" VerticalAlignment="Center" Width="48" Source="{Binding Channels[5].ShiftImageSource}" Grid.Column="0" Grid.Row="1" Margin="16,2" />
                                <Image Height="48" HorizontalAlignment="Center" Name="Channel6ShiftImage" Stretch="UniformToFill" VerticalAlignment="Center" Width="48" Source="{Binding Channels[6].ShiftImageSource}" Grid.Column="1" Grid.Row="1" Margin="16,2" />
                                <Image Height="48" HorizontalAlignment="Center" Name="Channel7ShiftImage" Stretch="UniformToFill" VerticalAlignment="Center" Width="48" Source="{Binding Channels[7].ShiftImageSource}" Grid.Column="2" Grid.Row="1" Margin="16,2" />
                                <Image Height="48" HorizontalAlignment="Center" Name="Channel8ShiftImage" Stretch="UniformToFill" VerticalAlignment="Center" Width="48" Source="{Binding Channels[8].ShiftImageSource}" Grid.Column="3" Grid.Row="1" Margin="16,2" />

                                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="1" FontSize="32" Grid.Column="0" Grid.Row="0" Margin="16,2" />
                                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="2" FontSize="32" Grid.Column="1" Grid.Row="0" Margin="16,2" />
                                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="3" FontSize="32" Grid.Column="2" Grid.Row="0" Margin="16,2" />
                                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="4" FontSize="32" Grid.Column="3" Grid.Row="0" Margin="16,2" />
                                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="5" FontSize="32" Grid.Column="0" Grid.Row="1" Margin="16,2" />
                                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="6" FontSize="32" Grid.Column="1" Grid.Row="1" Margin="16,2" />
                                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="7" FontSize="32" Grid.Column="2" Grid.Row="1" Margin="16,2" />
                                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="8" FontSize="32" Grid.Column="3" Grid.Row="1" Margin="16,2" />
                        
                        </Grid>
                        <Grid Grid.Row="7" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,4,24,4" Width="320">

                                <Grid.ColumnDefinitions>
                                        <ColumnDefinition />
                                        <ColumnDefinition />
                                </Grid.ColumnDefinitions>
                                <Image Height="96" HorizontalAlignment="Center" Name="Group1PushImage" Stretch="UniformToFill" VerticalAlignment="Center" Width="96" Source="{Binding Groups[1].PushImageSource}" Grid.Column="0" Grid.Row="0" Margin="16,2" />
                                <Image Height="96" HorizontalAlignment="Center" Name="Group2PushImage" Stretch="UniformToFill" VerticalAlignment="Center" Width="96" Source="{Binding Groups[2].PushImageSource}" Grid.Column="1" Grid.Row="0" Margin="16,2" />

                                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="左" FontSize="48" Grid.Column="0" Grid.Row="0" Margin="16,2" />
                                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="右" FontSize="48" Grid.Column="1" Grid.Row="0" Margin="16,2" />

                        </Grid>
                </Grid>
        </Grid>
        <Window.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="Black" Offset="0" />
                        <GradientStop Color="Gray" Offset="1" />
                </LinearGradientBrush>
        </Window.Background>
</Window>